Page({
  data: {
    languages: []
  },
  onLoad() {
    this.getForeignLanguages();
  },
  getForeignLanguages() {
    wx.request({
      url: 'http://localhost:8080/foreignlanguage/list', // 替换为实际的后端接口地址
      method: 'GET',
      success: (res) => {
        if (res.statusCode === 200) {
          console.log(res.data.data)
          this.setData({
            languages: res.data.data
          });
        }
      }
    });
  }
});